const request = require('../utils/request.js').request;
export function getSwiper() {
    return request('get', '/appCarousels')
}
export function getHotGoods() {
    return request('get', '/hotGoodList')
}
export function getNewGoods() {
    return request('get', '/newGoodList')
}
export function getCategories() {
    return request('get', '/getCategories')
}
export function getGoodList(data) {
    return request('get', '/commonGoodList', data)
}
export function getAppCategories() {
    return request('get', '/getAppCategories')
}
export function carouseGoodsList(data) {
    return request('get', '/carouseGoodsList', data)
}
export function getDetail(id) {
    return request('get', '/goods/detail/' + id,)
}
export function getDetailNo(id) {
    return request('get', '/goods/detailNoToken/' + id,)
}
export function goodsForRec(id) {
    return request('get', '/goodsForRecharge/detail/' + id,)
}
export function login(data) {
    return request('post', '/adminPhone/loginApi', data)
}
export function getAddressList(data) {
    return request('get', '/address', data)
}
export function postAddress(data) {
    return request('post', '/addressAdd', data)
}
export function uploadAddress(data) {
    return request('post', '/addressUpdate', data)
}
export function getAddress(addressId) {
    return request('get', '/getAddress/' + addressId)
}
export function delAddress(addressId) {
    return request('get', '/addressRemove/' + addressId)
}
export function getPlaceLists(data) {
    return request('get', '/getPlaceList', data)
}
export function addCart(data) {
    return request('post', '/shop-cart', data)
}
export function uploadCart(data) {
    return request('post', '/updateShopCart', data)
}
export function getCart() {
    return request('get', '/shop-cart/page')
}
export function delCart(cartItemId) {
    return request('get', '/removeShopCart/' + cartItemId)
}
export function postOrder(data) {
    return request('post', '/saveOrder', data)
}
export function toPay(data) {
    return request('post', '/pay/doPay ', data)
}
export function getOrderInfo(orderNo) {
    return request('get', '/getOrderInfo/' + orderNo)
}
export function getOrderList(data) {
    return request('get', '/order', data)
}
export function getOrderDetail(orderNo) {
    return request('get', '/getOrderInfo/' + orderNo)
}
export function getRecharge(data, token) {
    return request('get', '/getRecharge', data, token)
}
export function getCouponlist(data) {
    return request('get', '/couponUser/list', data)
}
export function cancelOrder(orderNo) {
    return request('put', `/order/${orderNo}/cancel`)
}
export function finishOrder(orderNo) {
    return request('put', `/order/${orderNo}/finish`)
}
export function removeOrder(id) {
    return request('get', `/removeOrderById/${id}`)
}
export function getCoupon(data) {
    return request('get', `/couponUserRec`, data)
}
export function getCouponIndex(data) {
    return request('get', `/couponUserOnIndex/list`, data)
}
export function getCouponIndexNo(data) {
    return request('get', `/couponAll/list`, data)
}
export function couponUserOnIndexOn(data) {
    return request('get', `/couponUserOnIndexOn/list`, data)
}
export function getCouponPay(orderNo) {
    return request('get', `/selectOrderCanUseCouponsByOrderNo/${orderNo}`)
}
export function getImgCash(data) {
    return request('get', `/getImgCash`, data)
}
export function getActUserInfo(data) {
    return request('get', `/getActUserInfo`, data)
}
export function getActRecharge(data) {
    return request('get', `/getActRecharge`, data)
}
export function getActRechargeInfo(data) {
    return request('get', `/getActRechargeInfo`, data)
}
export function ckGoods(goodsId) {
    return request('get', `/ckGoods/` + goodsId,)
}
export function getGoodsListByUser(data) {
    return request('get', `/getGoodsListByUser`, data)
}
export function getGoodsForRecList(data) {
    return request('get', `/getGoodsForRecList`, data)
}
export function toOrderRec(addressId, goodId, goodRec) {
    return request('get', `/toOrderRec/${addressId}/${goodId}/${goodRec}`)
}
export function addPet(data) {
    return request('post', '/petInfo/add', data)
}
export function getPetList(data) {
    return request('get', `/petInfo/list`, data)
}
export function toFeedBack(data) {
    return request('post', '/toFeedBack', data)
}
export function getPetInfo(id) {
    return request('get', `/petInfo/getById/${id}`)
}
export function updatePet(data) {
    return request('post', '/petInfo/update', data)
}
export function delPet(id) {
    return request('get', '/petInfo/delete/' + id)
}
export function search(data) {
    return request('get', '/search', data)
}
export function changePay(data) {
    return request('get', '/saveOrderBySuccess', data)
}
export function uploadInfo(data) {
    return request('put', '/user/info', data)
}
export function getUserRecharge(data) {
    return request('get', '/getUserInfoByRechargeInfo', data)
}
export function refOrderStatus(data) {
    return request('post', '/refOrderStatus', data)
}
export function payRecharge(data) {
    return request('post', '/pay/payRecharge', data)
}
export function getDeliRefOrderInfoOnApp(orderNo) {
    return request('get', '/getDeliRefOrderInfoOnApp/' + orderNo,)
}
export function refOrder(data) {
    return request('get', '/refOrder', data)
}
export function choseCoupon(couponId) {
    return request('get', '/choseCoupon/' + couponId,)
}
export function getActInfo() {
    return request('get', '/getActInfo',)
}
export function getBank() {
    return request('get', '/bank/list',)
}
export function postBank(data) {
    return request('post', '/bank/add', data)
}
export function editBank(data) {
    return request('post', '/bank/edit', data)
}
export function subTknum(refOrderNo, tkNum) {
    return request('get', `/updateTkNumOrderStatus/${refOrderNo}/${tkNum}`,)
}
export function defaultAddr() {
    return request('get', `/address/default`,)
}
export function saveOrderOnCk(data) {
    return request('post', '/saveOrderOnCk', data)
}
export function getTaoBaoqQRCodeONApp(data) {
    return request('post', '/getTaoBaoqQRCodeONApp', data)
}
export function usersRoleList(data) {
    return request('get', `/usersRoleList`, data)
}
export function listByUser(data) {
    return request('get', `/listByUser`, data)
}
export function setRole(userPhone, userNo, remark) {
    return request('get', `/setUserRespOnApp/${userPhone}/${userNo}/${remark}`)
}
export function deleteUser(userId) {
    return request('get', `/deleteUserRespOnApp/` + userId)
}
export function getActiveCoupon() {
    return request('get', `/couponUserOnIndexOnActive/list`)
}
export function getWaybillToken(orderId) {
    return request('get', `/getWaybillToken/` + orderId)
}
export function selectStoreQuery(token) {
    return request('get', `/selectStoreQuery/` + token)
}
export function getBrandList() {
    return request('get', `/getBrandListMap`)
}
export function orderList(data) {
    return request('get', `/orderListOnCk`, data)
}
export function getGoodGet(id) {
    return request('get', `/getGoodGet/` + id)
}
export function getGoodWant(id) {
    return request('get', `/getGoodWant/` + id)
}
export function saveOrderOnFx(data) {
    return request('post', '/saveOrderOnFx', data)
}
export function saveOrderOnTch(data) {
    return request('post', '/saveOrderOnTch', data)
}
export function payUserLv(data) {
    return request('post', '/pay/payUserLv', data)
}
export function getHotGoodList() {
    return request('get', `/hotGoodList`)
}
export function getCxInfoByGoodId(id) {
    return request('get', `/getCxInfoByGoodId/` + id)
}
export function getListCouponTotal() {
    return request('get', `/getListCouponTotal`)
}
export function getCouponMax() {
    return request('get', `/getCouponMax`)
}
export function getShareList() {
    return request('get', `/getShareList`)
}
export function insertUserShareInfo(data) {
    return request('post', '/insertUserShareInfo', data)
}
export function getShareDetail(orderNo) {
    return request('get', `/getShareByOrderNo/` + orderNo)
}
export function getUserMax(userId) {
    return request('get', `/getUserMax/` + userId)
}